package com.inf;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by zhangbn on 2018/11/8.
 */
@RestController
//@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})//pom文件中的spring-boot-starter-data-jpa已注释
@SpringBootApplication
@ImportResource(locations = {"classpath:applicationContext.xml"})
public class Application extends SpringBootServletInitializer {

    public static void main(String[] args) throws Exception {
        SpringApplication.run(Application.class, args);
    }


    /**
     * 测试用
     *
     * @return
     */
    @RequestMapping("/")
    public String home() {
        return "Hello Spring Boot!";
    }

}
